package com.futureCloudMOM.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.futureCloudMOM.core.entity.FBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Basic_RoutingProcess", description = "工艺工序")
@TableName(value = "Basic_RoutingProcess")
public class BasicRoutingProcess extends FBaseEntity implements Serializable {



    @NotNull(message="[工艺路线ID]不能为空")
    @ApiModelProperty("工艺路线ID")
    @TableField(value = "routingId")
    private Long routingId;

    @NotNull(message="[序号]不能为空")
    @ApiModelProperty("序号")
    @TableField(value = "subNo")
    private Long subNo;

    @NotNull(message="[工序ID]不能为空")
    @ApiModelProperty("工序ID")
    @TableField(value = "processId")
    private Long processId;

    @ApiModelProperty("工作中心ID")
    @TableField(value = "workCenterId")
    private Long workCenterId;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("等待时间")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "waitTime")
    private BigDecimal waitTime;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("标准工时")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "stdTime")
    private BigDecimal stdTime;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("加工工价")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "stdPrice")
    private BigDecimal stdPrice;

    @NotNull(message="[是否派工标记]不能为空")
    @ApiModelProperty("是否派工标记")
    @TableField(value = "assignFlag")
    private Long assignFlag;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("备注")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "remark")
    private String remark;

    @ApiModelProperty("下道工序Id")
    @TableField(value = "nextProcId")
    private Long nextProcId;

    @ApiModelProperty("上道工序Id")
    @TableField(value = "parentProcId")
    private Long parentProcId;

    @ApiModelProperty("报工规则(流程型/离散型)")
    @TableField(value = "reportRule")
    private Long reportRule;

    @NotNull(message="[是否计算准备时间]不能为空")
    @ApiModelProperty("是否计算准备时间")
    @TableField(value = "checkFlag")
    private Long checkFlag;

    @ApiModelProperty("是否打印标记")
    @TableField(value = "printFlag")
    private Long printFlag;

    @ApiModelProperty("并行工序标记")
    @TableField(value = "processFlag")
    private Long processFlag;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("工序要求（加工/其他） 加工需要派单生产 /其他属于非生产类 只计算准备时间 如搬运 或其他必要且无法和生产类结合的辅助工作")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "routingRequire")
    private String routingRequire;

    @ApiModelProperty("是否参与APS计算标记")
    @TableField(value = "apsFlag")
    private Long apsFlag;

    @ApiModelProperty("自研/委外")
    @TableField(value = "processType")
    private Long processType;






    @NotNull(message="[是否使用模具/工装]不能为空")
    @ApiModelProperty("是否使用模具/工装")
    @TableField(value = "useMould")
    private Integer useMould;

}

